<?php

/**
 * @file
 * Theme settings .
 */

function md_bonv_theme_settings_pages(&$form, &$form_state) {
	$form['md_bonv_settings']['pages'] = array(
		'#type' 					=> 'fieldset',
		'#weight' 				=> -2,
		'#prefix'  				=> '<div id="md-pages" class="md-tabcontent clearfix">',
		'#suffix'        => '</div><!-- / #md-pages -->',
	);
	
	$form['md_bonv_settings']['pages']['pages_htmllist'] = array(
		'#markup' 				=> '<div class="md-listleft">
				<ul>
					<li><a href="#p-layout">Layout settings</a></li>
					<li><a href="#p-contact">Contact</a></li>
				</ul>
			</div><div class="md-listcontent">',
		'#weight' 				=> -15,
	);
	$form['md_bonv_settings']['pages']['pages_htmllistclose'] = array(
		'#markup' 				=> '</div><!-- /.md-listleft -->',
		'#weight' 				=> 15,
	);
	
	/* 1.	Layout settings
	--------------------------------------------------------------------------*/
	$form['md_bonv_settings']['pages']['page_layout'] = array(
		'#type' 					=> 'fieldset',
		'#weight' 				=> -5,
		'#prefix'  				=> '<div id="p-layout" class="md-tabcontent clearfix">',
		'#suffix'        => '</div><!-- / #p-blog -->',
	);
	
  	$form['md_bonv_settings']['pages']['page_layout']['front_page_content'] = array(
      '#type'          => 'checkbox',
      '#title'         => t('Display "promoted to front page" content and sidebar on Front page'),
      '#default_value' => theme_get_setting('front_page_content'),
    );
  	
  	$form['md_bonv_settings']['pages']['page_layout']['contentop_blocks'] = array(
      '#type'          => 'select',
      '#title'         => t('Content top blocks'),
      '#default_value' => theme_get_setting('contentop_blocks'),
      '#options'       => array(
  													'0'   => t('Disable'),
                            '1'   => t('1 column'),
                            '2' 	=> t('2 columns'),
  													'3'   => t('3 columns'),
  													'4'   => t('4 columns'),
                          ),
  	);
  	
  	$form['md_bonv_settings']['pages']['page_layout']['sidebar_position'] = array(
      '#type'          => 'select',
      '#title'         => t('Sidebar position'),
      '#default_value' => theme_get_setting('sidebar_position'),
      '#options'       => array(
                            '1'   => t('Left'),
                            '2' 	=> t('Right'),
                          ),
  	);
  	
  	$form['md_bonv_settings']['pages']['page_layout']['bottom_blocks'] = array(
      '#type'          => 'select',
      '#title'         => t('Bottom blocks'),
      '#default_value' => theme_get_setting('bottom_blocks'),
      '#options'       => array(
  													'0'   => t('Disable'),
                            '1'   => t('1 column'),
                            '2' 	=> t('2 columns'),
  													'3'   => t('3 columns'),
														'7'   => t('3 columns b'),
  													'8'   => t('4 columns c'),
  													'4'   => t('4 columns'),
                          ),
  	);
  	
  	$form['md_bonv_settings']['pages']['page_layout']['node_blog_display'] = array(
      '#type'          => 'select',
      '#title'         => t('Blog display'),
      '#default_value' => theme_get_setting('node_blog_display'),
      '#options'       => array(
  													'1'   => t('1 column with large thumbnail'),
                            '2' 	=> t('1 column with thumbnail'),
  													'3'   => t('1 column with no thumbnail'),
  													'4'   => t('2 columns with big thumbnail'),
                          ),
  	);
  	
  	$form['md_bonv_settings']['pages']['page_layout']['node_portfolio_display'] = array(
      '#type'          => 'select',
      '#title'         => t('Our work display'),
      '#default_value' => theme_get_setting('node_portfolio_display'),
      '#options'       => array(
                            '1'   => t('Grid 1'),
                            '2' 	=> t('Grid 2'),
  													'3'   => t('Grid 3'),
														'4'   => t('Grid 4'),
                          ),
  	);
	
	
	/* 2.	Contact
	--------------------------------------------------------------------------*/
	$form['md_bonv_settings']['pages']['page_contact'] = array(
		'#type' 					=> 'fieldset',
		'#weight' 				=> -5,
		'#prefix'  				=> '<div id="p-contact" class="md-tabcontent clearfix">',
		'#suffix'        	=> '</div><!-- / #p-contact -->',
	);
		
		$form['md_bonv_settings']['pages']['page_contact']['latitude'] = array(
	    '#type'          => 'textfield',
	    '#title'         => t('Your latitude'),
	    '#description'   => t('You can fill your latitude here or just choose from map'),
	    '#default_value' => theme_get_setting('latitude'),
			'#prefix'  				=> '<div><div id="map_canvas" style="height: 450px; width: 99%;"></div><input type="button" value="Load map with my current location" id="loadcurrloc" class="button" /></div>',
	  );
		
		$form['md_bonv_settings']['pages']['page_contact']['longtitude'] = array(
	    '#type'          => 'textfield',
	    '#title'         => t('Your longtitude'),
	    '#description'   => t('You can fill your longtitude here or just choose from map'),
	    '#default_value' => theme_get_setting('longtitude'),
	  );
		
		$form['md_bonv_settings']['pages']['page_contact']['contact_title'] = array(
	    '#type'          => 'textfield',
	    '#title'         => t('Title on the map'),
	    '#default_value' => theme_get_setting('contact_title'),
	  );
		
		$form['md_bonv_settings']['pages']['page_contact']['contact_desc'] = array(
	    '#type' 				=> 'textarea',
	    '#title' 				=> t('Description on the map'),
			'#resizable' 		=> FALSE,
			'#rows' 				=> 3,
	    '#default_value' => theme_get_setting('contact_desc'),
	  );
}